//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.lyq.bean.mySql;

import java.sql.Connection;
import java.sql.PreparedStatement;

public class RemoveC_Sql {
    public RemoveC_Sql() {
    }

    public Boolean removeC_Sql(String No) {
        (new MysqlLinking()).getLink();
        Connection conn = MysqlLinking.conn;
        Boolean bool = false;
        if (conn != null) {
            try {
                String sql = "delete from course where C_No=?";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, No);
                int count = ps.executeUpdate();
                if (count >= 1) {
                    bool = true;
                }
            } catch (Exception var7) {
                Exception e = var7;
                e.printStackTrace();
            }
        } else {
            System.out.println("数据库连接错误！");
        }

        return bool;
    }
}
